package com.aabbc.user.facade;

import com.aabbc.user.entity.UserInfo;
import com.google.common.collect.Lists;
import org.springframework.stereotype.Component;

import java.time.Instant;
import java.util.Date;
import java.util.List;

/**
 * UserInfoFacadeFallback
 *
 * @author: <a href="mailto:chenfenghai@oristartech.com">chenfenghai</a>
 * @version: 1.0
 * @date: 2019-11-06 15:53
 */
@Component
public class UserInfoFacadeFallback implements IUserInfoFacade {

    @Override
    public List<UserInfo> queryUserInfoList() {
        UserInfo userInfo = new UserInfo();
        userInfo.setId(1L);
        userInfo.setName("admin");
        userInfo.setGender(1);
        userInfo.setCreateTime(Date.from(Instant.now()));
        userInfo.setUpdateTime(Date.from(Instant.now()));
        return Lists.newArrayList(userInfo);
    }
}
